package com.sakura.util.annotationPractice.NotNull;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import javax.validation.Valid;

/**
 * Created by apple on 2018/7/18.
 */
@Controller
public class NotNullController {


    @GetMapping("/")
    public String showForm(NotNullTest notNullTest) {
        return "form";
    }

    @PostMapping("/")
    public String checkPersonInfo(@Valid NotNullTest notNullTest) {

        return "form";
    }
}
